import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    component: () => import(/* webpackChunkName: "about" */ "../views/login.vue")
  },
  {
    path: '*',            //其他路由显示404
    component: () => import(/* webpackChunkName: "about" */ "../views/404.vue"),
  }
];

const router = new VueRouter({
  // 打包要用 history
  mode: "hash",
  base: process.env.BASE_URL,
  routes
});

export default router;
